
package hmvictor.jpql.nodes;

import java.io.File;
import javax.swing.Action;

/**
 *
 * @author Victor
 */
public class DriverNode extends JarNode{

    public DriverNode(FileChildrenFactory factory) {
        super(factory);
    }

    public DriverNode(File jarFile) {
        super(jarFile);
    }
    
    @Override
    public Action[] getActions(boolean context) {
        File file = getLookup().lookup(File.class);
        if(file != null) {
            return new Action[]{new RemoveDriverAction(this)};
        }else{
            return new Action[]{new AddDriverAction()};
        }
    }
    
}
